1. Field of the Invention
This invention relates to an information processing circuit, a microcomputer, and electronic equipment.
2. Description of Related Art
Demand has increased recently for a microcomputer that is capable of executing sum-of-products operation instructions rapidly. If a microcomputer can execute sum-of-products operations rapidly, it will be able to act as a digital signal processor (DSP), a dedicated image-processing IC, or a dedicated sound-processing IC, which would lower the costs of completed products and help simplify systems.
A sum-of-products operation instruction is executed by a microcomputer as described below. First of all, first sum-of-products input data has been stored in a first area in memory and second sum-of-products input data has been stored in a second area thereof. The microcomputer then uses two addresses that are specified by the contents of internal general-purpose registers to read from memory the first and second sum-of-products input data stored in these first and second areas. It then multiplies these first and second sum-of-products input data and a sum-of-products operation circuit adds the result to an internal register for the sum-of-products result (a MAC register)
However, a microcomputer that is capable of executing a sum-of-products operation instruction has the following problems:
(1) If the microcomputer is to execute the sum-of-products operations a plurality of times, the program must be written to have a sequence of the same number of sum-of-products operation instructions as the number of times that the sum-of-products operation instruction is to be repeated. Thus, if the number of times the sum-of-products operation is to be executed is increased, it is necessary to store a corresponding number of sum-of-products operation instructions, which increases the memory capacity required. One technique for solving this problem that could be considered is to write a program which executes sum-of-products operations while decrementing the number of times the sum-of-products operation is to be executed, then escapes from this loop when the number of executions reaches zero. This technique, however, increases the time required for executing each sum-of-products operation.
(2) If sum-of-products operations are executed sequentially, the execution time for one operation is limited by the time taken to read the first and second sum-of-products input data from memory.
(3) Up until now, first and second sum-of-products input data that are each of 16 bits, for example, are multiplied and the result of the multiplication is added to a 48-bit MAC register (a register for the sum-of-products result). In such a case, it is necessary to complete addition of the 48-bit data within one clock period, so this add processing becomes a critical path. Since the MAC register is only 48 bits long, it soon overflows if the sum-of-products operation is to be executed a large number of times.